Repository navigation
Conversation
pjain1
marked this pull request as draft
June 8, 2026 15:08
nishantmonu51
requested changes
Nov 1, 2026
nishantmonu51
left a comment
Collaborator
There was a problem hiding this comment.
Since I approved this in June, #9582 and #9883 have changed the code it builds on, so I'm moving this to request changes.
- The ClickHouse branch is unreachable on main. #9582 made ClickHouse's
LateralUnnestreturnauto == true, and theif autoreturn runs before the new!tupleStyleblock. After a rebase, ClickHouse emitsarrayJoin("tags") IN (SELECT ...). On ClickHouse 26.3, with rows[a,b],[a,b],[c],[],[d,a]and a subquery returning{a,b},INcounted the first two rows twice, andNOT INkept[d,a]while dropping[]. ThearrayExistsform in this PR returned the correct rows, so the approach is right; it just needs to run earlier. - #9883 replaced the array-contains API.
RequiresArrayContainsForInOperatorandGetArrayContainsFunctionare gone in favor ofArrayContainsAnyExpression(...) (expr string, ok bool). I suggest addingArrayContainsSubqueryExpression(arrExpr, subqueryExpr string) (expr string, ok bool)and handlingright.SubqueryinsidewriteArrayContainsCondition, returningfalse, nilwhen the dialect has no subquery form. DuckDB then falls through to the correlatedEXISTS(verified correct on main), ClickHouse getsarrayExists, and Databricks, Snowflake and BigQuery keep main's existing error. When resolvingwriteSubquery, please keep main'sEscapeAliasandExactMeasures. - Tests. The string-only tests stayed green after the branch became dead code. Please add an execution test using in-memory DuckDB and
testclickhouse.Startthat checks counts forINandNOT INon overlapping and empty arrays. Please also updateTestUnnestSubqueryFilterSQL, which currently expects DuckDB and ClickHouse to error.
Developed in collaboration with Claude Code
Member
Author
|
Is this even needed anymore? if not lets just close it unless someone raises this issue? |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Checklist: